<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<title></title>
</head>
<body>
<h1>首页</h1>

<form action="formaction.php" method="POST" enctype="multipart/form-data">
	<input type="file" name="pic">
	<input type="submit" name="" value="提交">
</form>
<div>
	<?php
	date_default_timezone_get("Asia/Shanghai");
	echo date("h:i:sa");
	echo "<br/>";
	echo readfile("webdemo.txt");
	echo "<br/>";

	// 打开file
	$myfile = fopen("webdemo1.txt", "w") or die("无法打开文件");
	// echo fread($myfile, filesize("webdemo.txt"));
	$test = "asdasdasd\n";
	fwrite($myfile, $test);
	$test1 = "第asdasdasdq123213\n";
	fwrite($myfile, $test1);
	fclose($myfile);
	?>
</div>
<div>
	<h3>增加一个标题</h3>
</div>

<?php
include 'footer.php';
?>
</body>
</html>